package com.datasure.application.res.assembler;

import com.datasure.application.req.command.DeviceRegisterCommand;
import com.datasure.application.res.dto.SourceDeviceShowDTO;
import com.datasure.application.res.dto.TargetDeviceShowDTO;
import com.datasure.domain.entity.Device;
import com.datasure.domain.entity.DeviceEx;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhangxiaolong
 * @ClassName DeviceDTOAssembler.java
 * @Description
 * @createTime 2022年01月14日 16:07:00
 */
@Mapper
public interface DeviceEntityAssembler {
    DeviceEntityAssembler INSTANCE = Mappers.getMapper(DeviceEntityAssembler.class);

    Device toDeviceFromSaveCommand(DeviceRegisterCommand registerCommand);

    DeviceEx toDeviceExFromSaveCommand(DeviceRegisterCommand registerCommand);

    SourceDeviceShowDTO toSourceDeviceShowDTO(Device device);

    TargetDeviceShowDTO toTagetDeviceShowDTO(Device device);
}
